import { createStore } from 'vuex'
import createPersistedState from "vuex-persistedstate";
import user from './modules/user'
import state from "./state"
import mutations from "./mutations"
import getters from "./getters"
import actions from "./actions"

export default createStore({
	plugins: [
		createPersistedState({ storage: window.localStorage }) //配置为sessionStorage，如果不传入对象就是默认
	],

	state,
	mutations,
	actions,
	getters,
	modules: {
		user
	},
})
